﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/AdminMasterPage.master" AutoEventWireup="true" CodeFile="quan-ly-nha-hang-slide.aspx.cs" Inherits="Admin_quan_ly_nha_hang_slide" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="grvResSlide" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="SlideID" onrowcancelingedit="grvResSlide_RowCancelingEdit" 
        onrowdeleting="grvResSlide_RowDeleting" onrowediting="grvResSlide_RowEditing" 
        onrowupdating="grvResSlide_RowUpdating">
        <Columns>
            <asp:BoundField DataField="TenNhaHang" HeaderText="Nhà Hàng" />
            <asp:TemplateField HeaderText="Hình Ảnh">
                <ItemTemplate>
                    <img runat="server" alt="" width="50" src='<%# "~/"+Eval("DuongDan") %>' />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:FileUpload ID="fuSlide" runat="server" />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ButtonType="Button" HeaderText="Sửa" ShowEditButton="True" />
            <asp:CommandField ButtonType="Button" HeaderText="Xóa" 
                ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <h1>Thêm slide</h1>
    <span>Chọn nhà hàng</span><asp:DropDownList ID="ddlRes" runat="server" 
        AutoPostBack="True" onselectedindexchanged="ddlRes_SelectedIndexChanged">
    </asp:DropDownList><span>Hình ảnh</span><asp:FileUpload ID="fuSlide" runat="server" />
    <asp:Button ID="btnOK"
        runat="server" Text="Thêm" onclick="btnOK_Click" />
</asp:Content>

